home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Sample Code / Snippets / Toolbox / AddResMenu7.1 / AddResMenu7.1.r < prev    next >
Encoding:
Text File  |  1992-11-12  |  5.5 KB  |  295 lines  |  [TEXT/MPS ]

  1. #include "types.r"
  2. resource 'MENU' (128, "apple menu", preload) {
  3.     128,
  4.     textMenuProc,
  5.     0x7FFFFFFD,
  6.     enabled,
  7.     apple,
  8.     {    /* array: 2 elements */
  9.         /* [1] */
  10.         "About", noIcon, noKey, noMark, plain,
  11.         /* [2] */
  12.         "-", noIcon, noKey, noMark, plain
  13.     }
  14. };
  15.  
  16. resource 'MENU' (129, "file menu", preload) {
  17.     129,
  18.     textMenuProc,
  19.     0xE00,
  20.     enabled,
  21.     "File",
  22.     {    /* array: 10 elements */
  23.         /* [1] */
  24.         "New", noIcon, "N", noMark, plain,
  25.         /* [2] */
  26.         "Open", noIcon, "O", noMark, plain,
  27.         /* [3] */
  28.         "Close", noIcon, "W", noMark, plain,
  29.         /* [4] */
  30.         "Save", noIcon, "S", noMark, plain,
  31.         /* [5] */
  32.         "Save As...", noIcon, noKey, noMark, plain,
  33.         /* [6] */
  34.         "-", noIcon, noKey, noMark, plain,
  35.         /* [7] */
  36.         "Page Setup...", noIcon, noKey, noMark, plain,
  37.         /* [8] */
  38.         "Print...", noIcon, "P", noMark, plain,
  39.         /* [9] */
  40.         "-", noIcon, noKey, noMark, plain,
  41.         /* [10] */
  42.         "Quit", noIcon, "Q", noMark, plain
  43.     }
  44. };
  45.  
  46. resource 'MENU' (130, "edit menu", preload) {
  47.     130,
  48.     textMenuProc,
  49.     0x3400,
  50.     enabled,
  51.     "Edit",
  52.     {    /* array: 6 elements */
  53.         /* [1] */
  54.         "Undo", noIcon, "Z", noMark, plain,
  55.         /* [2] */
  56.         "-", noIcon, noKey, noMark, plain,
  57.         /* [3] */
  58.         "Cut", noIcon, "X", noMark, plain,
  59.         /* [4] */
  60.         "Copy", noIcon, "C", noMark, plain,
  61.         /* [5] */
  62.         "Paste", noIcon, "V", noMark, plain,
  63.         /* [6] */
  64.         "Clear", noIcon, noKey, noMark, plain
  65.     }
  66. };
  67.  
  68. resource 'MENU' (131, "test menu") {
  69.     131,
  70.     textMenuProc,
  71.     0x7FFFFFFD,
  72.     enabled,
  73.     "Test Stuff",
  74.     {    /* array: 2 elements */
  75.         /* [1] */
  76.         "Add a Res Type...", noIcon, noKey, noMark, plain,
  77.         /* [2] */
  78.         "-", noIcon, noKey, noMark, plain
  79.     }
  80. };
  81.  
  82. resource 'DITL' (132, "none of this type ditl", purgeable) {
  83.     {    /* array DITLarray: 2 elements */
  84.         /* [1] */
  85.         {70, 150, 90, 208},
  86.         Button {
  87.             enabled,
  88.             "OK"
  89.         },
  90.         /* [2] */
  91.         {10, 90, 65, 328},
  92.         StaticText {
  93.             disabled,
  94.             "No resources of type \"^0\" in this file! "
  95.             "Try a different type."
  96.         }
  97.     }
  98. };
  99.  
  100. resource 'DITL' (131, "get type ditl", purgeable) {
  101.     {    /* array DITLarray: 4 elements */
  102.         /* [1] */
  103.         {90, 140, 110, 198},
  104.         Button {
  105.             enabled,
  106.             "OK"
  107.         },
  108.         /* [2] */
  109.         {90, 60, 110, 118},
  110.         Button {
  111.             enabled,
  112.             "Cancel"
  113.         },
  114.         /* [3] */
  115.         {0, 3, 48, 238},
  116.         StaticText {
  117.             disabled,
  118.             "What type of resource would you like add"
  119.             "ed to the 'Test' menu?"
  120.         },
  121.         /* [4] */
  122.         {50, 97, 68, 143},
  123.         EditText {
  124.             enabled,
  125.             "DLOG"
  126.         }
  127.     }
  128. };
  129.  
  130. resource 'DITL' (130, "bad sys ditl", purgeable) {
  131.     {    /* array DITLarray: 3 elements */
  132.         /* [1] */
  133.         {80, 100, 100, 158},
  134.         Button {
  135.             enabled,
  136.             "Exit"
  137.         },
  138.         /* [2] */
  139.         {10, 80, 27, 237},
  140.         StaticText {
  141.             disabled,
  142.             "Bad System Version!"
  143.         },
  144.         /* [3] */
  145.         {50, 25, 66, 232},
  146.         StaticText {
  147.             disabled,
  148.             "Requires System 7 or greater."
  149.         }
  150.     }
  151. };
  152.  
  153. resource 'DITL' (128, "about ditl", purgeable) {
  154.     {    /* array DITLarray: 5 elements */
  155.         /* [1] */
  156.         {164, 115, 184, 185},
  157.         Button {
  158.             enabled,
  159.             "OK"
  160.         },
  161.         /* [2] */
  162.         {5, 10, 37, 164},
  163.         StaticText {
  164.             disabled,
  165.             "The Simplest Shell"
  166.         },
  167.         /* [3] */
  168.         {76, 3, 154, 301},
  169.         StaticText {
  170.             disabled,
  171.             "FredWare from Apple Developer Technical "
  172.             "Support, ADS group.\nCopyright ©  1991-19"
  173.             "92 Apple Computer Inc.\nWritten by C.K. H"
  174.             "aun <TR>."
  175.         },
  176.         /* [4] */
  177.         {53, 82, 71, 227},
  178.         StaticText {
  179.             disabled,
  180.             "version 1.0d3"
  181.         },
  182.         /* [5] */
  183.         {10, 270, 42, 302},
  184.         Icon {
  185.             disabled,
  186.             128
  187.         }
  188.     }
  189. };
  190.  
  191. resource 'DITL' (129, "help ditl", purgeable) {
  192.     {    /* array DITLarray: 2 elements */
  193.         /* [1] */
  194.         {170, 90, 190, 148},
  195.         Button {
  196.             enabled,
  197.             "OK"
  198.         },
  199.         /* [2] */
  200.         {10, 40, 62, 204},
  201.         StaticText {
  202.             disabled,
  203.             "Help information should go here"
  204.         }
  205.     }
  206. };
  207.  
  208. data 'ALRT' (132, "none of type", purgeable) {
  209.     $"0028 0028 008D 0177 0084 5555"                      /* .(.(.ç.w.ÑUU */
  210. };
  211.  
  212. data 'ALRT' (128, "about dlog", purgeable) {
  213.     $"0028 0028 00E5 016B 0080 4444"                      /* .(.(...k.ÄDD */
  214. };
  215.  
  216. data 'ALRT' (130, "bad sys dlog", purgeable) {
  217.     $"0028 0028 0095 0128 0082 5555"                      /* .(.(.ï.(.ÇUU */
  218. };
  219.  
  220. data 'DLOG' (129, "MetaChars ^/(!", purgeable) {
  221.     $"0022 0028 00EA 0118 0001 0100 0100 0000"            /* .".(............ */
  222.     $"0000 0081 00"                                       /* ...Å. */
  223. };
  224.  
  225. data 'DLOG' (131, "ResType /3", purgeable) {
  226.     $"0028 0028 00AA 0118 0001 0100 0100 0000"            /* .(.(.™.......... */
  227.     $"0000 0083 00"                                       /* ...É. */
  228. };
  229.  
  230. resource 'MBAR' (128) {
  231.     {    /* array MenuArray: 4 elements */
  232.         /* [1] */
  233.         128,
  234.         /* [2] */
  235.         129,
  236.         /* [3] */
  237.         130,
  238.         /* [4] */
  239.         131
  240.     }
  241. };
  242.  
  243. data 'WIND' (128, "my window", purgeable) {
  244.     $"0028 0028 0136 023C 0008 0100 0100 0000"            /* .(.(.6.<........ */
  245.     $"0000 0653 696D 706C 65"                             /* ...Simple */
  246. };
  247.  
  248. resource 'SIZE' (-1, "SIZE") {
  249.     reserved,
  250.     acceptSuspendResumeEvents,
  251.     reserved,
  252.     canBackground,
  253.     multiFinderAware,
  254.     backgroundAndForeground,
  255.     dontGetFrontClicks,
  256.     ignoreChildDiedEvents,
  257.     is32BitCompatible,
  258.     isHighLevelEventAware,
  259.     localAndRemoteHLEvents,
  260.     notStationeryAware,
  261.     dontUseTextEditServices,
  262.     reserved,
  263.     reserved,
  264.     reserved,
  265.     50000,
  266.     50000
  267. };
  268.  
  269. resource 'STR ' (128, "help string") {
  270.     "Simple Help..."
  271. };
  272.  
  273. resource 'STR#' (128) {
  274.     {    /* array StringArray: 3 elements */
  275.         /* [1] */
  276.         "UnNamed",
  277.         /* [2] */
  278.         "Unused",
  279.         /* [3] */
  280.         "Unloved"
  281.     }
  282. };
  283.  
  284. resource 'ICON' (128) {
  285.     $"0007 F000 001C 1C00 0030 0600 0040 0900"
  286.     $"0EAC CC80 09A9 B7C0 0D6D 3570 1F00 0170"
  287.     $"1200 0030 127C 3E2C 3C0C B01F 2405 2018"
  288.     $"6401 0018 7402 0036 140E 0032 3C18 0032"
  289.     $"2C1F C011 2C00 0019 2455 541F 4655 543C"
  290.     $"4640 0434 2B5F FC76 1940 0456 19D5 54D4"
  291.     $"18D5 55B2 1C55 5512 3875 5612 785D 5C11"
  292.     $"D857 F40D A854 5405 B850 1404 F040 0404"
  293. };
  294.  
  295.